<template>
  <div>
    <el-radio-group style="width: 100%; text-align: left" v-model="radio">
      <el-radio :label="0">未完成</el-radio>
      <el-radio :label="1">已完成</el-radio>
    </el-radio-group>
    <div v-if="examShow.length != 0" class="exams">
      <exam-box
        v-for="item in examShow"
        :key="item.exam_id"
        :exam="item"
        :to="to"
      ></exam-box>
    </div>
    <el-empty v-else :image-size="200"></el-empty>
  </div>
</template>

<script>
import ExamBox from "@/components/ExamBox.vue";
export default {
  name: "Notification",
  props: ["exams", "event", "to"],
  components: { ExamBox },
  data() {
    return {
      radio: 0,
    };
  },
  computed: {
    examShow() {
      return this.exams.filter((v) => v.status === this.radio);
    },
  },
};
</script>

